# 基础镜像
#FROM openjdk:8-jre-alpine
FROM adoptopenjdk:8-jdk-openj9

# 指定工作目录
WORKDIR /data/yoj-backend-cloud

# 将 jar 包复制到工作目录
COPY target/yoj-gateway-2.1-SNAPSHOT.jar yoj-gateway.jar

# 暴露端口
EXPOSE 8101

# 启动命令
ENTRYPOINT [ \
    "java", \
    "-Xms64m", \
    "-Xmx64m", \
    "-Xmn24m", \
    "-XX:MetaspaceSize=32m", \
    "-XX:MaxMetaspaceSize=64m", \
    "-Duser.timezone=GMT+08", \
    "-Xshareclasses", \
    "-Xquickstart", \
    "-jar", \
    "yoj-gateway.jar", \
    "--spring.profiles.active=prod" \
]